package com.ldf.media.api.model.result;

// 在 ApiServiceImpl.java 中添加内部类
public  class StreamProxyResult {
    private String rtsp;
    private String mp4;
    private String ts;
    private String flv;
    private String rtmp;
    private String key;

    public StreamProxyResult(String host, int rtmpPort, int rtspPort, int httpPort, String app, String stream, String key) {
        this.rtsp = String.format("rtsp://%s:%d/%s/%s", host, rtspPort, app, stream);
        this.mp4 = String.format("http://%s:%d/%s/%s.live.mp4", host, httpPort, app, stream);
        this.ts = String.format("http://%s:%d/%s/%s.live.ts", host, httpPort, app, stream);
        this.flv = String.format("http://%s:%d/%s/%s.live.flv", host, httpPort, app, stream);
        this.rtmp = String.format("rtmp://%s:%d/%s/%s", host, rtmpPort, app, stream);
        this.key = key;
    }

    // Getter 方法
    public String getRtsp() {
        return rtsp;
    }

    public String getMp4() {
        return mp4;
    }

    public String getTs() {
        return ts;
    }

    public String getFlv() {
        return flv;
    }

    public String getRtmp() {
        return rtmp;
    }

    public String getKey() {
        return key;
    }
}
